/*
 * @(#)Splasher.java  2.0  January 31, 2004
 *
 * Copyright (c) 2003-2010 Werner Randelshofer
 * Hausmatt 10, Immensee, CH-6405, Switzerland.
 *
 * This software is in the public domain.
 * You are free to use, adapt, copy and license this work
 * without having to attribute to Werner Randelshofer.
 */
package fastSplash;

import bibSysTray.BibsysTray;

/**
 *
 * @author Werner Randelshofer
 */
public class Splasher {
    
    /**
     * Shows the splash screen, launches the application and then disposes the
     * splash screen.
     *
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        String mainClass = "bibsys.BibSys";

        SplashWindow.splash(Splasher.class.getResource("livros.jpg"));        
        SplashWindow.message("Aguardando " + mainClass + ".");
        try {
            SplashWindow.invokeMain(mainClass, args);            
            new BibsysTray();
            BibsysTray.showMessage("Aviso:", "O programa está minimizado.");
            for (int i = 0; i < 5; i++) {                
                SplashWindow.message("Pronto! Clique ou aguarde " + (5 - i) + "s.");
                Thread.sleep(1000);
            }            
            SplashWindow.disposeSplash();            
        } catch (InternalError e) {
            SplashWindow.message("Erro ao inicializar " + mainClass);
        } catch (InterruptedException ex) {
        }        
    }
}

